import request from '@/utils/request'

// 获取接口配置信息
export function getInterfaceConfigInfo(id) {
    return request({
        url: `/api/Systems/InterfaceConfig/${id}`,
        method: 'GET'
    })
}

// 获取接口配置信息列表
export function getInterfaceConfigList(data) {
    return request({
        url: `/api/Systems/InterfaceConfig`,
        method: 'GET',
        data
    })
}

// 添加接口配置信息
export function createInterfaceConfig(data) {
    return request({
        url: '/api/Systems/InterfaceConfig',
        method: 'POST',
        data
    })
}

// 更新接口配置信息
export function updateInterfaceConfig(data) {
    return request({
        url: `/api/Systems/InterfaceConfig/${data.id}`,
        method: 'PUT',
        data
    })
}
// 删除接口配置信息
export function delInterfaceConfig(id) {
    return request({
        url: `/api/Systems/InterfaceConfig/${id}`,
        method: 'DELETE'
    })
}

// 启动任务调度
export function TimeTaskEnable(id) {
    return request({
      url: `/api/Systems/InterfaceConfig/${id}/Actions/Enable`,
      method: 'put',
    })
  }
  // 停止任务调度
  export function TimeTaskStop(id) {
    return request({
      url: `/api/Systems/InterfaceConfig/${id}/Actions/Stop`,
      method: 'put',
    })
  }